<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta  charset="utf-8">
<meta  name="viewport"  content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>一元夺宝</title>
{php echo register_jssdk();}
<link  rel="stylesheet"  href="../addons/feng_duobao/template/css/css.css">
<script   src="../addons/feng_duobao/template/js/jquery.js" type="text/javascript"></script>
</head>
<body  style="background:#f6f6f8;">
<section  class="top_bar"> 
	<a  href="javascript:history.back(-1);"   title="返回"  class="back"><i  class="b_arr"></i>返回</a>
	<a  href="{php echo $this->createMobileUrl('index')}"  title="首页"  class="home">首页</a>
	<h2  id="oneNavTitle">个人资料</h2>
</section>
<section  class="wrap">
<section  class="address">
<p  class="tips">所有信息都为必填项</p>
<div  class="addr_info">
	<form id="form1" action="javascript:;" method="post">
    <ul>
	  <li><label  class="lb">收货姓名</label><input  id="acceptname"  class="ipt"  value="{$people['realname']}"  type="text"  placeholder="请输入正确收货姓名"></li>
	  <li><label  class="lb">手机号码</label><input  id="phone"  class="ipt"  value="{$people['mobile']}"  type="text"  placeholder="请输入正确手机号码"></li>
	  <li><label  class="lb">个人昵称</label><input  id="nickname"  class="ipt"  value="{$people['nickname']}"  type="text"  placeholder="请输入您的个人昵称"></li>
	  <li><label  class="lb">街道地址</label><input  id="addr"  class="ipt"  value="{$people['address']}"  type="text"  placeholder="请输入正确街道地址"></li>
	</ul>
	</form>
</div>
<div  class="save_opt">
	<p  id="oneSaveTips"  class="s_tips"  style="">为保证商品的到达 <span  class="fc3">请确认无误后再保存</span></p>
	<a  id="oneSaveAddr"  href="javascript:submit1();"  title="保存"  class="chk_btn"  style="">保存</a>
</div>
 </section>
</section>
</body>
<script type="text/javascript">
	function submit1(){	    
    	var form_input = document.getElementById("form1");
    	var acceptname = form_input['acceptname'].value;
    	var phone = form_input['phone'].value;
		var nickname = form_input['nickname'].value;
		var addr=form_input['addr'].value;
		if (!acceptname) {
			alert('请输入您的真实姓名！');
			return false;
		}
		if (!phone) {
			alert('请输入您的手机号码！');
			return false;
		}
		if (!nickname) {
			alert('请输入您的个人昵称！');
			return false;
		}
		if (!addr) {
			alert('请输入您的收货地址！');
			return false;
		}
		
		var message=confirm('请确认您的信息');
		if (message) {
        	$.post('{php echo $this->createMobileUrl('ajaxypsubmit',array('id'=>$people['id']))}',{acceptname:acceptname,phone:phone,nickname:nickname,addr:addr},function(m){
        	alert(m);
        	window.location.href="{php echo $this->createMobileUrl('profile')}";
        	},"html");
        };
    }
</script>
</html>